using System;
using System.Configuration;
using System.IO;
using BookDownloader.Core.Implementation.BaseLibEngine.Parser;

namespace BookDownloader.Core.Implementation.LibRusEc.Parser
{
	public class SqlFileStreamProvider : SqlFileCachedStreamProviderBase
	{

		protected override string GetPath(LibFileTypes fileType)
		{
			DirectoryInfo dir = Utility.GetDirectoryFromConfig("CachedSqlFiles");
			string path = String.Empty;
			switch (fileType)
			{
				case LibFileTypes.Author:
					path = @"libavtors.sql";
					break;
				case LibFileTypes.Book:
					path = @"libbook.sql";
					break;
				case LibFileTypes.AuthorBook:
					path = @"libavtor.sql";
					break;
			}
			return Path.Combine(dir.FullName,path);
		}
	}
}